[IA64] Add missing continuable destroy domain chunk
authorAlex Williamson <alex.williamson@hp.com>
Thu, 6 Sep 2007 18:57:13 +0000 (12:57 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Thu, 6 Sep 2007 18:57:13 +0000 (12:57 -0600)
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
xen/arch/ia64/xen/mm.c

index c5b8a3fe3c201f6bae11313eb151a62ee36e6fac..2e29f94a797b962b58bfa3da96d4ef6ce21e2647 100644 (file)
@@ -339,14 +339,22 @@ mm_teardown(struct domain* d)
     volatile pgd_t* pgd;
 
     if (mm->pgd == NULL)
-        return;
+        return 0;
 
     pgd = pgd_offset(mm, 0);
     for (i = 0; i < PTRS_PER_PGD; i++, pgd++) {
-        if (!pgd_present(*pgd)) // acquire semantics
+        unsigned long cur_offset = i << PGDIR_SHIFT;
+
+        if (mm_teardown_can_skip(d, cur_offset + PGDIR_SIZE))
             continue;
-        mm_teardown_pgd(d, pgd, i << PGDIR_SHIFT);
+        if (!pgd_present(*pgd)) { // acquire semantics
+            mm_teardown_update_offset(d, cur_offset);
+            continue;
+        }
+        if (mm_teardown_pgd(d, pgd, cur_offset))
+            return -EAGAIN;
     }
+    return 0;
 }
 
 static void